package com.platform.service.impl;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.platform.dao.PostsPictureDao;
import com.platform.entity.PostsPictureEntity;
import com.platform.service.PostsPictureService;

/**
 * 帖子图片表Service实现类
 *
 * @author czj
 * @email 729618941@qq.com
 * @date 2018-11-03 11:24:17
 */
@Service("postsPictureService")
public class PostsPictureServiceImpl implements PostsPictureService {
    @Autowired
    private PostsPictureDao postsPictureDao;

    @Override
    public PostsPictureEntity queryObject(Integer id) {
        return postsPictureDao.queryObject(id);
    }

    @Override
    public List<PostsPictureEntity> queryList(Map<String, Object> map) {
        return postsPictureDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return postsPictureDao.queryTotal(map);
    }

    @Override
    public int save(PostsPictureEntity postsPicture) {
        return postsPictureDao.save(postsPicture);
    }

    @Override
    public int update(PostsPictureEntity postsPicture) {
        return postsPictureDao.update(postsPicture);
    }

    @Override
    public int delete(Integer id) {
        return postsPictureDao.delete(id);
    }

    @Override
    public int deleteBatch(Integer[] ids) {
        return postsPictureDao.deleteBatch(ids);
    }

    @Override
    public void deleteByPostId(@Param("postId") Integer postId) {
        postsPictureDao.deleteByPostId(postId);
    }
}
